// Tags:
#include <cctype>
#include <cstdio>
#include <cstring>
#include <set>
#include <vector>

template <typename T>
inline T &read(T &x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

const int N = 100;
int n, m, q;
int e_cnt, heads[N], dep[N], f[N];
std::vector<int> vec[N], ari, snd;
std::multiset<int> set;
bool vis[N];

struct Edge {
  int v, nxt;
} e[N << 1];

inline void add(int u, int v) {
  e[++e_cnt].v = v, e[e_cnt].nxt = heads[u], heads[u] = e_cnt;
}

void dfs(int u) {
  for (int i = heads[u], v; i; i = e[i].nxt) {
    if ((v = e[i].v) != f[u]) {
      f[v] = u, dep[v] = dep[u] + 1;
      dfs(v);
    }
  }
}

inline int solve(int x, int y) {
  int res = 0;
  // set.clear();
  ari.clear();
  snd.clear();
  memset(vis, 0, sizeof(vis));
  if (dep[x] < dep[y]) std::swap(x, y);
  while (dep[x] > dep[y]) {
    // while (set.find(x) != set.end()) ++res, set.erase(x);
    vis[x] = true;
    for (std::vector<int>::iterator it = vec[x].begin(); it != vec[x].end();
         ++it) {
      // set.insert(*it);
      snd.push_back(*it);
    }
    x = f[x];
  }
  while (x != y) {
    vis[x] = vis[y] = true;
    for (std::vector<int>::iterator it = vec[x].begin(); it != vec[x].end();
         ++it) {
      snd.push_back(*it);
      // set.insert(*it);
    }
    for (std::vector<int>::iterator it = vec[y].begin(); it != vec[y].end();
         ++it) {
      // set.insert(*it);
      snd.push_back(*it);
    }
    // while (set.find(x) != set.end()) ++res, set.erase(x);
    // while (set.find(y) != set.end()) ++res, set.erase(y);
    x = f[x], y = f[y];
  }
  // for (std::vector<int>::iterator it = vec[y].begin(); it != vec[y].end();
  //      ++it) {
  //   set.insert(*it);
  // }
  // while (set.find(y) != set.end()) ++res, set.erase(y);
  vis[x] = true;
  for (std::vector<int>::iterator it = snd.begin(); it != snd.end(); ++it) {
    if (vis[*it]) ++res;
  }
  return res;
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen64("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen64("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("mail.in", "r", stdin);
  freopen("mail.out", "w", stdout);
#endif
#endif

  read(n), read(m), read(q);
  for (int i = 1, u, v; i < n; ++i) {
    read(u), read(v);
    add(u, v), add(v, u);
  }
  f[1] = 1, dfs(1);
  for (int i = 1, a, b; i <= m; ++i) {
    read(a), read(b);
    vec[a].push_back(b), vec[b].push_back(a);
  }
  for (int t, x, y; q; --q) {
    read(t), read(x), read(y);
    if (t == 2) {
      vec[x].push_back(y), vec[y].push_back(x);
    } else {
      printf("%d\n", solve(x, y));
    }
  }
  return 0;
}